package com.smz.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.smz.dao.TVehicleCarDAO;
import com.smz.entity.TLogistics;
import com.smz.entity.TVehicleCar;
import com.smz.entity.TVehicleDriver;
import com.smz.service.TLogisticsService;
import com.smz.service.TVehicleCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TVehicleCarServiceImpl extends ServiceImpl<TVehicleCarDAO,TVehicleCar> implements TVehicleCarService {

    @Autowired
    private TVehicleCarDAO tVehicleCarDAO;


    @Override
    public List<TVehicleCar> findTVehicleCarAllGgy() {
        return tVehicleCarDAO.selectTVehicleCarAllGgy();
    }
    @Override
    public IPage<TVehicleCar> findTVehicleCarPage(int current, int size) {
        return tVehicleCarDAO.findTVehicleCarPage(new Page(current,size));
    }

    @Override
    public IPage<TVehicleCar> findTVehicleCarPageId(int current, int size, int vehicleId) {
        return tVehicleCarDAO.findTVehicleCarPageId(new Page(current,size),vehicleId);
    }

    @Override
    public IPage<TVehicleCar> findTVehicleCarPageNameNumber(int current, int size, String vehicleName, String numberPlate) {
        return tVehicleCarDAO.findTVehicleCarPageNameNumber(new Page(current,size),vehicleName,numberPlate);
    }

    @Override
    public List<TVehicleDriver> findCarDriverName() {
        return tVehicleCarDAO.findCarDriverName();
    }

    @Override
    public List<TLogistics> findCarLogisticsName() {
        return tVehicleCarDAO.findCarLogisticsName();
    }


}
